import MerakUserCard from "./index.vue";

export interface MerakUserInfoType {
  user_id: string | number;
  avatar: string;
  name: string;
  sex: 0 | 1;
  location: string;
  mobile: string | number;
  job_no: string | number;
  nationality: string | number;
  company: string;
  department: string;
  post: string;
}

export type MerakUserAuthType = Record<string, { show?: boolean; action?: boolean }>;

/**
 * @param key 操作按钮唯一值
 * @param title 按钮展示文字
 */
export interface MerakUserBtnType {
  key: string;
  title: string;
}

/**
 * @param init 是否开始异步查询员工信息
 * @param userId 员工ID 异步查询员工信息关键参数
 * @param userInfo 员工信息 与 userId 互斥 直接展示卡片
 * @param userAuth 员工信息查看权限
 * @param userBtns 员工查看操作按钮 已默认 可自定义
 */
export interface MerakUserCardProps {
  init?: boolean;
  userId?: string | number;
  userInfo?: Record<string, any>;
  userBtns?: MerakUserBtnType[];
}

export default MerakUserCard;
